using Enemy;
using UnityEngine;
//可破坏物品
public class DestructibleCharacter : Character
{
    [Header("爆炸特效")]
    public GameObject explosiveEffects ; // 敌人的受击特效动画控制器

    // 死亡逻辑
    protected override void Die()
    {
        Destroy(gameObject);
        //爆炸特效
        Instantiate(explosiveEffects, transform.position, Quaternion.identity);
        //生成掉落物品
        GetComponent<ItemSpawner>().DropItems();
        AudioManager.Instance.PlaySFX("木箱破碎");
    }
}